<html><head><title>Printer.pb</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<pre><font face="Courier New, Courier, mono"size="2"><font color="#3A3966">;
</font><font color="#3A3966">; ------------------------------------------------------------
</font><font color="#3A3966">;
</font><font color="#3A3966">;   PureBasic - Printer example file
</font><font color="#3A3966">;
</font><font color="#3A3966">;    (c) Fantaisie Software
</font><font color="#3A3966">;
</font><font color="#3A3966">; ------------------------------------------------------------
</font><font color="#3A3966">;
</font>
<b><font color="#3A3966">If</font></b> <font color="#3A3966">PrintRequester</font>()

  <b><font color="#3A3966">If</font></b> <font color="#3A3966">StartPrinting</font>(&quot;PureBasic Test&quot;)
  
<font color="#3A3966">    LoadFont</font>(0, &quot;Arial&quot;, 30)
<font color="#3A3966">    LoadFont</font>(1, &quot;Arial&quot;, 100)
  
    <b><font color="#3A3966">If</font></b> <font color="#3A3966">StartDrawing</font>(<font color="#3A3966">PrinterOutput</font>())
      
<font color="#3A3966">      BackColor</font>(<font color="#3A3966">RGB</font>(255, 255, 255)) <font color="#3A3966">; Uses white as back color, usuful when printing on a white sheet
</font><font color="#3A3966">      FrontColor</font>(<font color="#3A3966">RGB</font>(0, 0, 0)) <font color="#3A3966">; Use black for standard text color
</font>      
<font color="#3A3966">      DrawingFont</font>(<font color="#3A3966">FontID</font>(0))
<font color="#3A3966">      DrawText</font>(100, 100, &quot;PureBasic Printer Test&quot;)
      
<font color="#3A3966">      DrawingFont</font>(<font color="#3A3966">FontID</font>(1))
<font color="#3A3966">      DrawText</font>(100, 400, &quot;PureBasic Printer Test 2&quot;)
    
      <b><font color="#3A3966">If</font></b> <font color="#3A3966">LoadImage</font>(0, <font color="#924B72">#PB_Compiler_Home</font> + &quot;examples/sources/Data/PureBasic.bmp&quot;)
<font color="#3A3966">        DrawImage</font>(<font color="#3A3966">ImageID</font>(0), 200, 600)
      <b><font color="#3A3966">Else</font></b>
<font color="#3A3966">        MessageRequester</font>(&quot;Error&quot;,&quot;Can't load the image&quot;)
      <b><font color="#3A3966">EndIf</font></b>
      
<font color="#3A3966">      Box</font>(200, 1000, 100, 100,<font color="#3A3966"> RGB</font>(255, 0, 0)) <font color="#3A3966">; Draw a red box
</font>        
<font color="#3A3966">      StopDrawing</font>()
    <b><font color="#3A3966">EndIf</font></b>
    
<font color="#3A3966">    StopPrinting</font>()
  <b><font color="#3A3966">EndIf</font></b>
<b><font color="#3A3966">EndIf</font></b></font></pre>
</body></html>
